package cn.zebra.dev.admin.module.product.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

/**
 * @author runnable@sina.cn
 */
@Getter
@Setter
@ToString
public class ProductSkuVO {
    private Long id;

    @ApiModelProperty(value = "Sku编码")
    private String productSkuSn;

    @ApiModelProperty("商品sku规格图片")
    private String productSkuImage;

    @ApiModelProperty("sku名称")
    private String productSkuName;

    @ApiModelProperty("成本价")
    private BigDecimal costPrice;

    @ApiModelProperty("销售价")
    private BigDecimal marketPrice;

    @ApiModelProperty("单价(销售价)")
    @NotNull(message = "销售价不能为空!")
    @DecimalMin(value = "0.0001", message = "销售价不能小于0.0001!")
    private BigDecimal unitPrice;

    @ApiModelProperty("重量kg")
    private BigDecimal weight;

    @ApiModelProperty("体积m³")
    private BigDecimal volume;

    @ApiModelProperty("Sku库存")
    @NotNull(message = "请输入Sku库存")
    private Long totalNum;

    @ApiModelProperty("是否显示")
    @NotNull(message = "选择是否显示该规格")
    private Boolean showFlag;

    @ApiModelProperty("sku规格内容")
    @NotNull(message = "请选择一个有效的SKU规格列表!")
    @NotEmpty(message = "请选择一个有效的SKU规格列表!")
    private List<ProductSkuAttributeVO> attrEntities;
}
